package com.dragon.modules.yuegou.query.system;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.dragon.modules.yuegou.entity.system.AppVersionEntity;
import com.dragon.modules.yuegou.enums.system.AppVersionPrdType;
import com.dragon.modules.yuegou.enums.system.AppVersionType;
import com.dragon.modules.yuegou.mybatis.Condition;
import com.dragon.modules.yuegou.mybatis.Query;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonUnwrapped;

import java.time.LocalDateTime;
/**
 * app版本管理 动态查询条件
 * 
 * @author pbuilder generated
 * @date 2019-09-24 19:50:07
 * @version 2.0
 */
@JsonInclude(Include.NON_NULL)
public class AppVersionQuery extends AppVersionEntity implements Query<AppVersionEntity> {

    /** 查询条件 */
	@JsonUnwrapped(prefix = "id")
	private Condition<String> idCondition;

    /** 对应的appid查询条件 */
	@JsonUnwrapped(prefix = "appId")
	private Condition<String> appIdCondition;

    /** 版本名称查询条件 */
	@JsonUnwrapped(prefix = "name")
	private Condition<String> nameCondition;

    /** [枚举]版本类型：0-IOS-IOS、1-安卓-ANDROID、2-小程序-APPLETS查询条件 */
	@JsonUnwrapped(prefix = "type")
	private Condition<AppVersionType> typeCondition;

    /** [枚举]产品类型：0-悦商圈-YSQ、1-悦商惠-YSH、2-悦荷包-WALLET、3-悦商管-YSG查询条件 */
	@JsonUnwrapped(prefix = "prdType")
	private Condition<AppVersionPrdType> prdTypeCondition;

    /** 版本号查询条件 */
	@JsonUnwrapped(prefix = "version")
	private Condition<String> versionCondition;

    /** 版本下载路径查询条件 */
	@JsonUnwrapped(prefix = "updatePath")
	private Condition<String> updatePathCondition;

    /** 是否最新版本：0-否、1-是查询条件 */
	@JsonUnwrapped(prefix = "lastVersion")
	private Condition<Boolean> lastVersionCondition;

    /** 是否强制更新：0-否、1-是查询条件 */
	@JsonUnwrapped(prefix = "forceUpdate")
	private Condition<Boolean> forceUpdateCondition;

    /** 版本更新说明查询条件 */
	@JsonUnwrapped(prefix = "remarks")
	private Condition<String> remarksCondition;

    /** 查询条件 */
	@JsonUnwrapped(prefix = "createdTime")
	private Condition<LocalDateTime> createdTimeCondition;

    /** 查询条件 */
	@JsonUnwrapped(prefix = "createdBy")
	private Condition<String> createdByCondition;

    /** 查询条件 */
	@JsonUnwrapped(prefix = "modifiedTime")
	private Condition<LocalDateTime> modifiedTimeCondition;

    /** 查询条件 */
	@JsonUnwrapped(prefix = "modifiedBy")
	private Condition<String> modifiedByCondition;

	/**
	 * 构造一个查询条件对象
	 */
	public AppVersionQuery() {
		super();
	}

	/**
	 * 依据实体对象构造一个查询条件对象
	 * 
	 * @param entity 实体对象
	 */
	public AppVersionQuery(AppVersionEntity entity) {
		super(entity);
	}

	/**
	 * 依据其它查询条件对象的信息构造一个查询条件对象
	 * 
	 * @param other 查询条件对象
	 */
	public AppVersionQuery(AppVersionQuery other) {
		super(other);
		if(other.idCondition != null) {
			this.idCondition = other.idCondition.copy();
		}
		if(other.appIdCondition != null) {
			this.appIdCondition = other.appIdCondition.copy();
		}
		if(other.nameCondition != null) {
			this.nameCondition = other.nameCondition.copy();
		}
		if(other.typeCondition != null) {
			this.typeCondition = other.typeCondition.copy();
		}
		if(other.prdTypeCondition != null) {
			this.prdTypeCondition = other.prdTypeCondition.copy();
		}
		if(other.versionCondition != null) {
			this.versionCondition = other.versionCondition.copy();
		}
		if(other.updatePathCondition != null) {
			this.updatePathCondition = other.updatePathCondition.copy();
		}
		if(other.lastVersionCondition != null) {
			this.lastVersionCondition = other.lastVersionCondition.copy();
		}
		if(other.forceUpdateCondition != null) {
			this.forceUpdateCondition = other.forceUpdateCondition.copy();
		}
		if(other.remarksCondition != null) {
			this.remarksCondition = other.remarksCondition.copy();
		}
		if(other.createdTimeCondition != null) {
			this.createdTimeCondition = other.createdTimeCondition.copy();
		}
		if(other.createdByCondition != null) {
			this.createdByCondition = other.createdByCondition.copy();
		}
		if(other.modifiedTimeCondition != null) {
			this.modifiedTimeCondition = other.modifiedTimeCondition.copy();
		}
		if(other.modifiedByCondition != null) {
			this.modifiedByCondition = other.modifiedByCondition.copy();
		}
	}

	@Override
	public QueryWrapper<AppVersionEntity> toQueryWrapper() {
		QueryWrapper<AppVersionEntity> wrapper = new QueryWrapper<>(this);
		if (idCondition != null) {
			idCondition.toWrapper(wrapper, COL_ID);
		}
		if (appIdCondition != null) {
			appIdCondition.toWrapper(wrapper, COL_APP_ID);
		}
		if (nameCondition != null) {
			nameCondition.toWrapper(wrapper, COL_NAME);
		}
		if (typeCondition != null) {
			typeCondition.toWrapper(wrapper, COL_TYPE);
		}
		if (prdTypeCondition != null) {
			prdTypeCondition.toWrapper(wrapper, COL_PRD_TYPE);
		}
		if (versionCondition != null) {
			versionCondition.toWrapper(wrapper, COL_VERSION);
		}
		if (updatePathCondition != null) {
			updatePathCondition.toWrapper(wrapper, COL_UPDATE_PATH);
		}
		if (lastVersionCondition != null) {
			lastVersionCondition.toWrapper(wrapper, COL_LAST_VERSION);
		}
		if (forceUpdateCondition != null) {
			forceUpdateCondition.toWrapper(wrapper, COL_FORCE_UPDATE);
		}
		if (remarksCondition != null) {
			remarksCondition.toWrapper(wrapper, COL_REMARKS);
		}
		if (createdTimeCondition != null) {
			createdTimeCondition.toWrapper(wrapper, COL_CREATED_TIME);
		}
		if (createdByCondition != null) {
			createdByCondition.toWrapper(wrapper, COL_CREATED_BY);
		}
		if (modifiedTimeCondition != null) {
			modifiedTimeCondition.toWrapper(wrapper, COL_MODIFIED_TIME);
		}
		if (modifiedByCondition != null) {
			modifiedByCondition.toWrapper(wrapper, COL_MODIFIED_BY);
		}
		return wrapper;
	}
	
	/**
	 * 构造并返回查询条件
	 * 
	 * @return idCondition 查询条件
	 */
	public Condition<String> id() {
		this.idCondition = new Condition<>();
		return this.idCondition;
	}
	
	/**
	 * 获取查询条件
	 * 
	 * @return idCondition 查询条件
	 */
	public Condition<String> getIdCondition() {
		return idCondition;
	}

	/**
	 * 设置查询条件
	 * 
	 * @param idCondition 查询条件
	 */
	public void setIdCondition(Condition<String> idCondition) {
		this.idCondition = idCondition;
	}

	/**
	 * 构造并返回对应的appid查询条件
	 * 
	 * @return appIdCondition 对应的appid查询条件
	 */
	public Condition<String> appId() {
		this.appIdCondition = new Condition<>();
		return this.appIdCondition;
	}
	
	/**
	 * 获取对应的appid查询条件
	 * 
	 * @return appIdCondition 对应的appid查询条件
	 */
	public Condition<String> getAppIdCondition() {
		return appIdCondition;
	}

	/**
	 * 设置对应的appid查询条件
	 * 
	 * @param appIdCondition 对应的appid查询条件
	 */
	public void setAppIdCondition(Condition<String> appIdCondition) {
		this.appIdCondition = appIdCondition;
	}

	/**
	 * 构造并返回版本名称查询条件
	 * 
	 * @return nameCondition 版本名称查询条件
	 */
	public Condition<String> name() {
		this.nameCondition = new Condition<>();
		return this.nameCondition;
	}
	
	/**
	 * 获取版本名称查询条件
	 * 
	 * @return nameCondition 版本名称查询条件
	 */
	public Condition<String> getNameCondition() {
		return nameCondition;
	}

	/**
	 * 设置版本名称查询条件
	 * 
	 * @param nameCondition 版本名称查询条件
	 */
	public void setNameCondition(Condition<String> nameCondition) {
		this.nameCondition = nameCondition;
	}

	/**
	 * 构造并返回[枚举]版本类型：0-IOS-IOS、1-安卓-ANDROID、2-小程序-APPLETS查询条件
	 * 
	 * @return typeCondition [枚举]版本类型：0-IOS-IOS、1-安卓-ANDROID、2-小程序-APPLETS查询条件
	 */
	public Condition<AppVersionType> type() {
		this.typeCondition = new Condition<>();
		return this.typeCondition;
	}
	
	/**
	 * 获取[枚举]版本类型：0-IOS-IOS、1-安卓-ANDROID、2-小程序-APPLETS查询条件
	 * 
	 * @return typeCondition [枚举]版本类型：0-IOS-IOS、1-安卓-ANDROID、2-小程序-APPLETS查询条件
	 */
	public Condition<AppVersionType> getTypeCondition() {
		return typeCondition;
	}

	/**
	 * 设置[枚举]版本类型：0-IOS-IOS、1-安卓-ANDROID、2-小程序-APPLETS查询条件
	 * 
	 * @param typeCondition [枚举]版本类型：0-IOS-IOS、1-安卓-ANDROID、2-小程序-APPLETS查询条件
	 */
	public void setTypeCondition(Condition<AppVersionType> typeCondition) {
		this.typeCondition = typeCondition;
	}

	/**
	 * 构造并返回[枚举]产品类型：0-悦商圈-YSQ、1-悦商惠-YSH、2-悦荷包-WALLET、3-悦商管-YSG查询条件
	 * 
	 * @return prdTypeCondition [枚举]产品类型：0-悦商圈-YSQ、1-悦商惠-YSH、2-悦荷包-WALLET、3-悦商管-YSG查询条件
	 */
	public Condition<AppVersionPrdType> prdType() {
		this.prdTypeCondition = new Condition<>();
		return this.prdTypeCondition;
	}
	
	/**
	 * 获取[枚举]产品类型：0-悦商圈-YSQ、1-悦商惠-YSH、2-悦荷包-WALLET、3-悦商管-YSG查询条件
	 * 
	 * @return prdTypeCondition [枚举]产品类型：0-悦商圈-YSQ、1-悦商惠-YSH、2-悦荷包-WALLET、3-悦商管-YSG查询条件
	 */
	public Condition<AppVersionPrdType> getPrdTypeCondition() {
		return prdTypeCondition;
	}

	/**
	 * 设置[枚举]产品类型：0-悦商圈-YSQ、1-悦商惠-YSH、2-悦荷包-WALLET、3-悦商管-YSG查询条件
	 * 
	 * @param prdTypeCondition [枚举]产品类型：0-悦商圈-YSQ、1-悦商惠-YSH、2-悦荷包-WALLET、3-悦商管-YSG查询条件
	 */
	public void setPrdTypeCondition(Condition<AppVersionPrdType> prdTypeCondition) {
		this.prdTypeCondition = prdTypeCondition;
	}

	/**
	 * 构造并返回版本号查询条件
	 * 
	 * @return versionCondition 版本号查询条件
	 */
	public Condition<String> version() {
		this.versionCondition = new Condition<>();
		return this.versionCondition;
	}
	
	/**
	 * 获取版本号查询条件
	 * 
	 * @return versionCondition 版本号查询条件
	 */
	public Condition<String> getVersionCondition() {
		return versionCondition;
	}

	/**
	 * 设置版本号查询条件
	 * 
	 * @param versionCondition 版本号查询条件
	 */
	public void setVersionCondition(Condition<String> versionCondition) {
		this.versionCondition = versionCondition;
	}

	/**
	 * 构造并返回版本下载路径查询条件
	 * 
	 * @return updatePathCondition 版本下载路径查询条件
	 */
	public Condition<String> updatePath() {
		this.updatePathCondition = new Condition<>();
		return this.updatePathCondition;
	}
	
	/**
	 * 获取版本下载路径查询条件
	 * 
	 * @return updatePathCondition 版本下载路径查询条件
	 */
	public Condition<String> getUpdatePathCondition() {
		return updatePathCondition;
	}

	/**
	 * 设置版本下载路径查询条件
	 * 
	 * @param updatePathCondition 版本下载路径查询条件
	 */
	public void setUpdatePathCondition(Condition<String> updatePathCondition) {
		this.updatePathCondition = updatePathCondition;
	}

	/**
	 * 构造并返回是否最新版本：0-否、1-是查询条件
	 * 
	 * @return lastVersionCondition 是否最新版本：0-否、1-是查询条件
	 */
	public Condition<Boolean> lastVersion() {
		this.lastVersionCondition = new Condition<>();
		return this.lastVersionCondition;
	}
	
	/**
	 * 获取是否最新版本：0-否、1-是查询条件
	 * 
	 * @return lastVersionCondition 是否最新版本：0-否、1-是查询条件
	 */
	public Condition<Boolean> getLastVersionCondition() {
		return lastVersionCondition;
	}

	/**
	 * 设置是否最新版本：0-否、1-是查询条件
	 * 
	 * @param lastVersionCondition 是否最新版本：0-否、1-是查询条件
	 */
	public void setLastVersionCondition(Condition<Boolean> lastVersionCondition) {
		this.lastVersionCondition = lastVersionCondition;
	}

	/**
	 * 构造并返回是否强制更新：0-否、1-是查询条件
	 * 
	 * @return forceUpdateCondition 是否强制更新：0-否、1-是查询条件
	 */
	public Condition<Boolean> forceUpdate() {
		this.forceUpdateCondition = new Condition<>();
		return this.forceUpdateCondition;
	}
	
	/**
	 * 获取是否强制更新：0-否、1-是查询条件
	 * 
	 * @return forceUpdateCondition 是否强制更新：0-否、1-是查询条件
	 */
	public Condition<Boolean> getForceUpdateCondition() {
		return forceUpdateCondition;
	}

	/**
	 * 设置是否强制更新：0-否、1-是查询条件
	 * 
	 * @param forceUpdateCondition 是否强制更新：0-否、1-是查询条件
	 */
	public void setForceUpdateCondition(Condition<Boolean> forceUpdateCondition) {
		this.forceUpdateCondition = forceUpdateCondition;
	}

	/**
	 * 构造并返回版本更新说明查询条件
	 * 
	 * @return remarksCondition 版本更新说明查询条件
	 */
	public Condition<String> remarks() {
		this.remarksCondition = new Condition<>();
		return this.remarksCondition;
	}
	
	/**
	 * 获取版本更新说明查询条件
	 * 
	 * @return remarksCondition 版本更新说明查询条件
	 */
	public Condition<String> getRemarksCondition() {
		return remarksCondition;
	}

	/**
	 * 设置版本更新说明查询条件
	 * 
	 * @param remarksCondition 版本更新说明查询条件
	 */
	public void setRemarksCondition(Condition<String> remarksCondition) {
		this.remarksCondition = remarksCondition;
	}

	/**
	 * 构造并返回查询条件
	 * 
	 * @return createdTimeCondition 查询条件
	 */
	public Condition<LocalDateTime> createdTime() {
		this.createdTimeCondition = new Condition<>();
		return this.createdTimeCondition;
	}
	
	/**
	 * 获取查询条件
	 * 
	 * @return createdTimeCondition 查询条件
	 */
	public Condition<LocalDateTime> getCreatedTimeCondition() {
		return createdTimeCondition;
	}

	/**
	 * 设置查询条件
	 * 
	 * @param createdTimeCondition 查询条件
	 */
	public void setCreatedTimeCondition(Condition<LocalDateTime> createdTimeCondition) {
		this.createdTimeCondition = createdTimeCondition;
	}

	/**
	 * 构造并返回查询条件
	 * 
	 * @return createdByCondition 查询条件
	 */
	public Condition<String> createdBy() {
		this.createdByCondition = new Condition<>();
		return this.createdByCondition;
	}
	
	/**
	 * 获取查询条件
	 * 
	 * @return createdByCondition 查询条件
	 */
	public Condition<String> getCreatedByCondition() {
		return createdByCondition;
	}

	/**
	 * 设置查询条件
	 * 
	 * @param createdByCondition 查询条件
	 */
	public void setCreatedByCondition(Condition<String> createdByCondition) {
		this.createdByCondition = createdByCondition;
	}

	/**
	 * 构造并返回查询条件
	 * 
	 * @return modifiedTimeCondition 查询条件
	 */
	public Condition<LocalDateTime> modifiedTime() {
		this.modifiedTimeCondition = new Condition<>();
		return this.modifiedTimeCondition;
	}
	
	/**
	 * 获取查询条件
	 * 
	 * @return modifiedTimeCondition 查询条件
	 */
	public Condition<LocalDateTime> getModifiedTimeCondition() {
		return modifiedTimeCondition;
	}

	/**
	 * 设置查询条件
	 * 
	 * @param modifiedTimeCondition 查询条件
	 */
	public void setModifiedTimeCondition(Condition<LocalDateTime> modifiedTimeCondition) {
		this.modifiedTimeCondition = modifiedTimeCondition;
	}

	/**
	 * 构造并返回查询条件
	 * 
	 * @return modifiedByCondition 查询条件
	 */
	public Condition<String> modifiedBy() {
		this.modifiedByCondition = new Condition<>();
		return this.modifiedByCondition;
	}
	
	/**
	 * 获取查询条件
	 * 
	 * @return modifiedByCondition 查询条件
	 */
	public Condition<String> getModifiedByCondition() {
		return modifiedByCondition;
	}

	/**
	 * 设置查询条件
	 * 
	 * @param modifiedByCondition 查询条件
	 */
	public void setModifiedByCondition(Condition<String> modifiedByCondition) {
		this.modifiedByCondition = modifiedByCondition;
	}

}
